using System;

namespace IDeal.Services
{
    public class DefaultTypeActivator : ITypeActivator
    {
        public T CreateInstance<T>(params object[] constructorArguments)
        {
            return (T)Activator.CreateInstance(typeof(T), constructorArguments);
        }

        public T CreateInstance<T>(Type type, params object[] constructorArguments)
        {
            return (T) Activator.CreateInstance(type, constructorArguments);
        }
    }
}